package com.kclm.se.generic;

import java.util.Arrays;
import java.util.List;

public class UseMyEntry {

	public static void main(String[] args) {
		MyEntry<Integer, String> e1 = new MyEntry<>(1, "春天");
		MyEntry<Integer, String> e2 = new MyEntry<>(2, "夏天");
		MyEntry<Integer, String> e3 = new MyEntry<>(3, "秋天");
		MyEntry e4 = new MyEntry(4,"冬天");
		
		//
		//List<MyEntry<Integer, String>> list = new ArrayList<>();
		//list.add(e1);
		//list.add(e2);
		//list.add(e3);
		
		List<MyEntry<Integer, String>> list = Arrays.asList(e1,e2,e3,e4);
		//
		for(MyEntry<Integer, String> me : list) {
			System.out.println(me); //me.toString
		}
	}
}
